﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DTO;
using BLL;

namespace GUI.Home.UC
{
    public partial class UC_TinTuc_Rss : System.Web.UI.UserControl
    {
        protected List<FeedDTO> _lstFeed;
        protected FeedDTO _feedDTO;

        #region protected void Page_Load(object sender, EventArgs e)
        protected void Page_Load(object sender, EventArgs e)
        {

            FeedBLL _feedBLL = new FeedBLL();

            _feedDTO = new FeedDTO();
            _lstFeed = new List<FeedDTO>();

            string _urlFeed = "http://www.24h.com.vn/upload/rss/congnghethongtin.rss";
            //Cai nay co the thay doi tu table ThamSo

            try
            {
                _lstFeed = _feedBLL.GetListFeed(_urlFeed);

                //DTLTinTucRss.DataSource = _lstFeed;
                //DTLTinTucRss.DataBind();
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
        #endregion
    }
}